home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python-cairo.preinst < prev    next >
Text File  |  2009-07-27  |  761b  |  27 lines

  1. #!/bin/sh -e
  2.  
  3.  
  4.  
  5. PYCENTRAL=/usr/bin/pycentral
  6.  
  7. case "$1" in
  8.     upgrade)
  9.         if dpkg --compare-versions "$2" lt 1.8.4-2; then
  10.             if [ -x $PYCENTRAL ]; then
  11.                 # explicitly remove old python-central files
  12.                 pycentral pkgremove python-cairo
  13.             fi
  14.             # be really really sure about it, in case we update
  15.             # from 1.8.4-1
  16.             for pyversion in 2.4 2.5; do
  17.                 if [ -d /usr/lib/python$pyversion/site-packages/cairo/ ]; then
  18.                     rm -f /usr/lib/python$pyversion/site-packages/cairo/__init__.py*
  19.                     rmdir --ignore-fail-on-non-empty /usr/lib/python$pyversion/site-packages/cairo
  20.                 fi
  21.             done
  22.         fi
  23.     ;;
  24.     *)
  25.     ;;
  26. esac
  27.